package com.aizuda.boot.modules.business.feishu.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * @Author sangyirong
 * @ClassName ApprovalParam
 * @Version 1.0
 * @Date 2025/7/21 10:35
 */
@Data
public class ApprovalParam {

    @Schema(description = "操作类型,APPROVE、REJECT")
    private String action_type;

    @Schema(description = "操作上下文")
    private String action_context;

    @Schema(description = "用户ID")
    private String user_id;

    @Schema(description = "三方审批定义 Code")
    private String approval_code;

    @Schema(description = "审批实例ID")
    private String instance_id;

    @Schema(description = "任务ID")
    private String task_id;

    @Schema(description = "发送消息卡片返回的 message_id")
    private Long message_id;

    @Schema(description = "搜索返回的任务 ID")
    private String id;

    @Schema(description = "原因")
    private String reason;

    @Schema(description = "附件")
    private List<Attachment> attachments;

    @Schema(description = "三方审批定义配置的 action_callback_token")
    private String token;

    @Schema(description = "加密信息")
    private String encrypt;

    @Schema(description = "HTTP code > 400 时，自定义返回错误信息")
    private String message;

    @Schema(description = "HTTP code > 400 时，是否返回自定义错误信息")
    private String without_prefix;

    @Data
    private static class Attachment{

        @Schema(description = "文件类型")
        private String file_type;

        @Schema(description = "文件大小")
        private Integer file_size;

        @Schema(description = "文件名")
        private String file_name;

        @Schema(description = "url")
        private String url;
    }
}
